From: Jan Beulich Date: Fri, 5 Oct 2018 14:24:56 +0000 (+0200) Subject: fix uninitialized variable error in do_poll() X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3178 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=34af96ed586fa4594453fabccbd87a5eb686ff16;p=xen.git fix uninitialized variable error in do_poll() Now that CONFIG_HVM can (and should) be turned off for the shim, gcc 8.2 apparently is no longer sure that "port" is indeed initialized at if ( sched_poll->nr_ports == 1 ) v->poll_evtchn = port; It doesn't look to be impossible for the compiler to prove it is not, but we also can't rely on that to be the case. Add an initializer. Signed-off-by: Jan Beulich Acked-by: Wei Liu --- diff --git a/xen/common/schedule.c b/xen/common/schedule.c index f426fd8202..a957c5e57c 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -1014,7 +1014,7 @@ static long do_poll(struct sched_poll *sched_poll) { struct vcpu *v = current; struct domain *d = v->domain; - evtchn_port_t port; + evtchn_port_t port = 0; long rc; unsigned int i;